package vn.com.pavibook.model.vo;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Min;

import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

public class BookVO implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private int id;
	
	@NotEmpty(message = "Nhập thông tin")
    private String name;
    
    private String title;
    
    @NotEmpty(message = "Nhập thông tin")
    private String author;
    
    private int publisherId;
    
    @Min(value = 1,message="Nhập thông tin")
    private int bookTypeId;
    
    private double price;
    
    @NotEmpty(message = "Nhập thông tin")
    private String datePublish;
   
    private String status;
    
    private short active;
    
    @Range(min=0,max=99999999,message="Nhập số")
    private double discount;
    
    private int numberRepublish;
    
    @NotEmpty(message = "Nhập thông tin")
    private String shortDescription;
   
    private String longDescription;
   
    private Boolean isHot;
   
    private int likeNumber;
   
    private Date createDate;
    
    private String urlPdfFile;
    
    private String urlImageFile;
    
    private CommonsMultipartFile pdfFileUpload;
    
    private CommonsMultipartFile imageFileUpload;

	public BookVO() {
		super();
	}

	public BookVO(int id, String name, String title, String author,
			int publisherId, int bookTypeId, double price, String datePublish,
			String status, short active, double discount,
			int numberRepublish, String shortDescription,
			String longDescription, Boolean isHot, int likeNumber,
			Date createDate, String urlPdfFile, String urlImageFile,
			CommonsMultipartFile pdfFileUpload, CommonsMultipartFile imageFileUpload) {
		super();
		this.id = id;
		this.name = name;
		this.title = title;
		this.author = author;
		this.publisherId = publisherId;
		this.bookTypeId = bookTypeId;
		this.price = price;
		this.datePublish = datePublish;
		this.status = status;
		this.active = active;
		this.discount = discount;
		this.numberRepublish = numberRepublish;
		this.shortDescription = shortDescription;
		this.longDescription = longDescription;
		this.isHot = isHot;
		this.likeNumber = likeNumber;
		this.createDate = createDate;
		this.urlPdfFile = urlPdfFile;
		this.urlImageFile = urlImageFile;
		this.pdfFileUpload = pdfFileUpload;
		this.imageFileUpload = imageFileUpload;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public int getPublisherId() {
		return publisherId;
	}

	public void setPublisherId(int publisherId) {
		this.publisherId = publisherId;
	}

	public int getBookTypeId() {
		return bookTypeId;
	}

	public void setBookTypeId(int bookTypeId) {
		this.bookTypeId = bookTypeId;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getDatePublish() {
		return datePublish;
	}

	public void setDatePublish(String datePublish) {
		this.datePublish = datePublish;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public short getActive() {
		return active;
	}

	public void setActive(short active) {
		this.active = active;
	}

	public double getDiscount() {
		return discount;
	}

	public void setDiscount(double discount) {
		this.discount = discount;
	}

	public int getNumberRepublish() {
		return numberRepublish;
	}

	public void setNumberRepublish(int numberRepublish) {
		this.numberRepublish = numberRepublish;
	}

	public String getShortDescription() {
		return shortDescription;
	}

	public void setShortDescription(String shortDescription) {
		this.shortDescription = shortDescription;
	}

	public String getLongDescription() {
		return longDescription;
	}

	public void setLongDescription(String longDescription) {
		this.longDescription = longDescription;
	}

	public Boolean getIsHot() {
		return isHot;
	}

	public void setIsHot(Boolean isHot) {
		this.isHot = isHot;
	}

	public int getLikeNumber() {
		return likeNumber;
	}

	public void setLikeNumber(int likeNumber) {
		this.likeNumber = likeNumber;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getUrlPdfFile() {
		return urlPdfFile;
	}

	public void setUrlPdfFile(String urlPdfFile) {
		this.urlPdfFile = urlPdfFile;
	}

	public String getUrlImageFile() {
		return urlImageFile;
	}

	public void setUrlImageFile(String urlImageFile) {
		this.urlImageFile = urlImageFile;
	}

	public CommonsMultipartFile getPdfFileUpload() {
		return pdfFileUpload;
	}

	public void setPdfFileUpload(CommonsMultipartFile pdfFileUpload) {
		this.pdfFileUpload = pdfFileUpload;
	}

	public CommonsMultipartFile getImageFileUpload() {
		return imageFileUpload;
	}

	public void setImageFileUpload(CommonsMultipartFile imageFileUpload) {
		this.imageFileUpload = imageFileUpload;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
    
}
